#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    connect(this,&Widget::mysignal,this,&Widget::handlemysignal);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::handlemysignal(const QString text)
{
    this->setWindowTitle(text);
}


void Widget::on_pushButton_clicked()
{
    emit mysignal("QQ飞车");
}

void Widget::on_pushButton_2_clicked()
{
    emit mysignal("穿越火线");
}
